using System.ComponentModel.DataAnnotations;
 using System.Data.Entity.ModelConfiguration;
using SalesPages.DomainModel;
namespace SalesPages.EntityFrameworkRepository.Mapping
{
    public class LetterUserMap : EntityTypeConfiguration<LetterUser>
    {
        public LetterUserMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.emailaddress)
                .HasMaxLength(150);

            // Table & Column Mappings
            this.ToTable("LetterUser");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.emailaddress).HasColumnName("emailaddress");
        }
    }
}
